home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / lastcom.zip / REGSAVE.INC < prev    next >
Text File  |  1993-01-04  |  1KB  |  23 lines

  1.  
  2. {when invoked, this procedure saves the registers into the structured constant
  3.  'REGS' and restores the ds from the previously saved integer constant 'saveds'}
  4.  
  5.     inline(
  6.     $53/                               {PUSH BX}
  7.     $BB/regs/                          {MOV BX,OFFSET REGS}
  8.     $2E/$89/$47/$00/                   {CS:MOV [BX]0,AX}
  9.     $58/                               {POP AX}
  10.     $2E/$89/$47/$02/                   {CS:MOV [BX]2,AX}
  11.     $2E/$89/$4F/$04/                   {CS:MOV [BX]4,CX}
  12.     $2E/$89/$57/$06/                   {CS:MOV [BX]6,DX}
  13.     $2E/$89/$6F/$08/                   {CS:MOV [BX]8,BP}
  14.     $2E/$89/$77/$0A/                   {CS:MOV [BX]A,SI}
  15.     $2E/$89/$7F/$0C/                   {CS:MOV [BX]C,DI}
  16.     $2E/$8C/$5F/$0E/                   {CS:MOV [BX]E,DS}
  17.     $2E/$8C/$47/$10/                   {CS:MOV [BX]10,ES}
  18.     $9C/                               {PUSHF}
  19.     $58/                               {POP AX}
  20.     $2E/$89/$47/$12/                   {CS:MOV [BX]12,AX}
  21.     $2E/$8E/$1E/saveds                 {CS:MOV DS,SAVEDS -- PUT PROPER DS}
  22.     );
  23.